﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vit.Common;
using Vit.Common.Models;

namespace Vit.Common.Providers.DefaultProviders
{
    public class DefaultMembershipProvider : IMembershipProvider
    {
        #region IMembershipProvider Members

        public IUser GetCurrentUser()
        {
            return CreateAnoymousUser();
        }

        public IUser CreateAnoymousUser()
        {
            return null;
        }

        public IUser GetUserByName(string name)
        {
            return CreateAnoymousUser();
        }

        public IUser GetUserById(object id)
        {
            return CreateAnoymousUser();
        }

        public bool CheckOperationPermission(IUser user, string uri)
        {
            return true;
        }

        public bool CheckModelPermission(IUser user, Type entityType, string propertyName)
        {
            return true;
        }

        #endregion

        #region IProvider Members

        public string Name
        {
            get { return "DefaultMembershipProvider"; }
        }

        #endregion
    }
}
